import { fieldAuthorizePlugin, makeSchema } from "nexus";
import NexusPrismaScalars from 'nexus-prisma/scalars'

import * as Users from './user';

export const schema = makeSchema({
    types: [
        NexusPrismaScalars,
        Users,
    ],
    plugins: [
        fieldAuthorizePlugin({
            formatError: () => new Error("Unauthorized"),
        }),
    ],
});
